import request from '../request'
//分类的接口
let DETAIL_URL = '/goods'
//同类数据 接口
let SAME_URL = '/goods/relevant'
//热销数据
let HOT_URL = '/goods/hot'
//tab栏数据
// let EVALUATE_URL = '/goods/:id/evaluate'
//热销榜
// let PAGE_URL = '/goods/:id/evaluate/page'
//详情页数据的设置api
export function getcategoods(id) {
    return request({
        url: DETAIL_URL,
        method: 'get',
        params: { id }
    })
}
//获取同类商品的接口数据
export function getSame(id, limit = 16) {
    // console.log(id);
    return request({
        url: SAME_URL,
        method: "get",
        params: { limit },
        id: id
    });
}
//获取右侧的接口数据
export function getHot(id, limit, type) {
    // console.log(id);
    return request({
        url: HOT_URL,
        method: "get",
        params: { limit },
        type: type,
        id: id
    });
}

